<!DOCTYPE HTML>
<html>
<head>
	<meta charset="utf-8">
	<meta name="renderer" content="webkit|ie-comp|ie-stand">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
	<meta http-equiv="Cache-Control" content="no-siteapp">
	<!--[if lt IE 9]>
	<script type="text/javascript" src="./Public/Admin/lib/html5.js"></script>
	<script type="text/javascript" src="./Public/Admin/lib/respond.min.js"></script>
	<script type="text/javascript" src="./Public/Admin/lib/PIE_IE678.js"></script>
    <![endif]-->
	<link href="./Public/Admin/css/H-ui.min.css" rel="stylesheet" type="text/css">

	<!--[if IE 6]>
	<script type="text/javascript" src="./Public/Home/lib/DD_belatedPNG_0.0.8a-min.js" ></script>
	<script>DD_belatedPNG.fix('*');</script>
    <![endif]-->
	<title>网站后台管理系统</title>
	<meta name="keywords" content="">
	<meta name="description" content="">
	<script type="text/javascript" src="./Public/Admin/lib/jquery/1.9.1/jquery.min.js"></script>
	<script type="text/javascript" src="./Public/Admin/lib/layer/1.9.3/layer.js"></script>
	<link rel="stylesheet" href="./Public/Admin/lib/layer/1.9.3/skin/layer.css" id="layui_layer_skinlayercss">
	<style>
		.wwprint{
			float:left;
		}
		.wprint{
			float:left;
			display:none;
		}
		.wl{
			float:right;
		}
		.wprint span{
			float:left;
		}
		@media print {
			.noprint {display: none; }
			.wprint{
				display:block;
			}
			.wwprint{
				display:none;
			}
			.table th, .table td{
				padding:4px;
				line-height:12px;
			}
			th,td{
				font-size:10px;
			}
			.print{
				width:auto;
			}
			.bdprint{
				border: 1px;
			}
			.qingdan{
				height:200mm;/*A5纸张一半大小，纵向*/
				width: 148mm;
			}
		}
	</style>
</head>
<body>
<div class="pd-20">
	<div style="float:left;padding-bottom:20px;">
		<button type="button"  class="cpicklist btn btn-success btn-sm mt noprint"  onClick="peihuodan()" >
			打印配货单
		</button>
		<button type="button"  class="printems btn btn-success btn-sm mt noprint" >
			打印面单
		</button>
		<button type="button" class="qdprint btn btn-success btn-sm mt noprint" onclick="qingdan()"><!--style="background: #fff;border:none" -->
			打印清单
		</button>
	</div>
	<form id="form2" action="{:U('pickcollect')}" name="form2">
		<!--startprint-->
		<table class="table table-border table-bordered table-hover table-bg phdprint">
			<thead>
			<tr>
				<th scope="col" colspan="4">

					<span style="float:left">拣货单号：	<img width="235.3px" height="59.4px" class="" src="__PUBLIC__/plugins/barcodegen/test_1D.php?text={$picklist_no}"/>
					</span>
					<if condition="count($pickorder_list) LT C('base_config.basket_nums')">
						<span style="float:right">
							<img width="235.3px" height="59.4px" class="" src="__PUBLIC__/Admin/images/1000000.jpg"/>
						</span>
					</if>
				</th>
			</tr>
			<tr class="text-c">
				<th width="">商品编号</th>
				<th width="" class="print">商品名称</th>
				<th width="">总数量</th>
				<th width="">库位</th>
			</tr>
			</thead>
			<tbody  id="goodslist">
			<volist name="Pickgoods_list" id="v">
				<tr class="text-c">
					<td class="goods_sn">{$v.goods_no}</td>
						
					<td class="goods_name">{$v.goods_name}</td>
						
					<td class="goods_count">{$v.goods_count}</td>
						
					<td>{$v.name}</td>

				</tr>
			</volist>
			<tr class="text-c">
				<td>备注:</td>
				<td colspan='3'>
					<volist name="count_list" id="vo">
						<notempty name="vo.erp_mark_mailno">
							【{$vo.erp_mark_mailno}|{$vo.count}次】
						</notempty>
					</volist>
				</td>
			</tr>
			</tbody>
		</table>
		<volist name="pickorder_list" id="val">
			<!-- <div style="page-break-after: always;"></div>   -->
			<table class="table table-border table-bordered table-hover table-bg noprint" style="margin-top:40px;">
				<thead>
				<tr>
					<th scope="col" colspan="8">
						<span class="wwprint">
							<span>订单编号：{$val['order_no']}</span>
							<!-- &nbsp;&nbsp;&nbsp;&nbsp;{$val['mailNo']} -->
						</span>
						<span class="wprint">
							<span>订单编号：</span>
							<span><img width="175.3px" height="52.4px" class="" src="__PUBLIC__/plugins/barcodegen/test_1D.php?text={$val['order_no']}" alt="barcode"/></span>
						</span>

						<span class="wprint wl">
							<span>物流单号：</span>
							<span><img width="175.3px" height="52.4px" class="" src="__PUBLIC__/plugins/barcodegen/test_1D.php?text={$val['mailNo']}" alt="barcode"/></span>
						</span>
					</th>
				</tr>
				<tr class="text-c">
					<th width="40">商品编号</th>
					<th width="40">商品名称</th>
					<th width="40">数量</th>
					<th width="40">规格</th>
					<!-- <th width="40">申报价格</th> -->
					<th width="40">产销国</th>
					<!-- <th width="40">HSCODE</th> -->
				</tr>
				</thead>
				<tbody  id="goodslist">
				<volist name="val['goods']" id="vo">
					<tr class="text-c">
						<td>{$vo.goods_no}</td>
						<td>{$vo.goods_name}</td>
						<td>{$vo.goods_nums}</td>
						<td>{$vo.spec}</td>
						<!-- <td>{$vo.spec}</td> -->
						<td>{$vo.country_name.country_name}</td>
						<!-- <td>{$vo.hs_code}</td> -->
					</tr>
				</volist>
				</tbody>

			</table>
		</volist>
		<volist name="pickorder_list" id="val">
			<!-- <div style="page-break-after: always;"></div>   -->
			<table align="center" class="table table-border table-bordered table-hover table-bg noprint qingdan" style="margin-top:0px;display: none;border: none;">
				<thead>
				<tr scope="col" style="border: none;">
					<th width="33" style="border: none;"></th>
					<th width="33" style="text-align: center;border: none;"><h3>订单商品清单</h3></th>
					<th width="33" style="text-align: center;border: none;"><span class=""><!--class=wprint-->
						<!--<span>订单编号：</span>-->
						<span style="float:right"><img width="175.3px" height="52.4px" class="" src="__PUBLIC__/plugins/barcodegen/test_1D.php?text={$val['old_order_no']}" alt="barcode"/></span>
					</span></th>
				</tr>
				<tr scope="col">
					<td width="40%" style="border: none;">订单号：{$val['old_order_no']}</td>
					<td width="30%" style="border: none;">仓库： 杭州下沙保税仓</td>
					<td width="30%" style="border: none;">物流单号：{$val['mailNo']}</td>
				</tr>
				<tr  scope="col">
					<td  style="border: none;">收货人：{$val['user_name']}</td>
					<td  style="border: none;">收货人电话：{$val['user_phone']}</td>
				</tr>
				<tr  scope="col">
					<td  colspan="3" style="border: none;">收货地址：{$val['user_address']}</td>
				</tr>
				<tr  scope="col"><td style="border: none;"></td><td style="border: none;"></td><td style="border: none;"><span style="float: right">筐号：（{$val['box_no']}）</span></td></tr>
				<tr  scope="col"><td style="border: none;"></td><td style="border: none;"></td><td style="border: none;"></td></tr>
				<td colspan="3" style="border:none;">
					<table style="width: 95%;">
						<tr class="bdprint">
							<th width="40%" style="text-align: center;border:1px solid rgb(221,221,221);">商品编号</th>
							<th width="10%" style="text-align: center;border:1px solid rgb(221,221,221);">数量</th>
							<th width="50%" style="text-align: center;border:1px solid rgb(221,221,221);">商品名称</th>
							<!-- <th width="40">HSCODE</th> -->
						</tr>
						</thead>
						<volist name="val['goods']" id="vo">
							<tr>
								<td style="text-align: center;border:1px solid rgb(221,221,221);">{$vo.goods_no}</td>
								<td style="text-align: center;border:1px solid rgb(221,221,221);">{$vo.goods_nums}</td>
								<td style="text-align: center;border:1px solid rgb(221,221,221);">{$vo.goods_name}</td>
							</tr>
						</volist></table></td>
						<tr>
							<td style="border: none;"><b>总数量</b>：{$val['nums_count_all']}</td>
							<td style="border: none;"></td>
							<td style="border: none;"></td>
						</tr>

				<tr><td colspan="3" style="border: none;"></td></tr>
				<tr><td colspan="3" style="border: none;"></td></tr>
				<tr><td colspan="3" style="border: none;"></td></tr>
				<tr>
					<td style="border: none;" colspan="2"><b>仓库订单号</b>：{$val['order_no']}<br><br><!--<hr><br>--><b>制单时间</b>：{$picklist_time|date="Y年m月d日 星期$day H:i:s",###}</td>

					<td style="border: none;text-align: right"><span class=""><!--class=wprint-->
						<!--<span>订单编号：</span>-->
						<span style="float:right"><img width="175.3px" height="52.4px" class="" src="__PUBLIC__/plugins/barcodegen/test_1D.php?text={$val['order_no']}" alt="barcode"/></span>
					</span></td></tr>
			</table>
			<div style="page-break-after: always;"></div>
		</volist>
		<!--endprint-->
		<button type="button" class="cpicklist btn btn-success btn-sm mt noprint"  onClick="peihuodan()" >
			打印配货单
		</button>
		<button type="button" class="printems btn btn-success btn-sm mt noprint" >
			打印面单
		</button>
		<button type="button" class="qdprint btn btn-success btn-sm mt noprint" onclick="qingdan()">
			打印清单
		</button>
	</form>
</div>

</body>
<script>
	var bagInboundInfoUrl="{:U('Outbound/printorder_green')}";

	function qingdan(){
		//$('.qingdan').toggle();
		$(".qingdan").show();
		$(".phdprint").attr('class','able table-border table-bordered table-hover table-bg phdprint noprint');
		$(".qingdan").attr('class','table table-border table-bordered table-hover table-bg  qingdan');
		window.print();
		$(".qingdan").hide()
	}
	function peihuodan(){
		//javascript:window.print()
		$(".phdprint").attr('class','able table-border table-bordered table-hover table-bg phdprint');
		$(".qingdan").attr('class','table table-border table-bordered table-hover table-bg noprint qingdan');
		window.print();
	}
	$('.printems_sf').click(function(){
		$('input[name=sf]').val(0);
		$('#emsform').submit();
	});
	$('.printems').click(function(){
		var index=layer.open({
			type: 2,
			title: '打印面单',
			shadeClose: true,
			shade: 0.5,
			offset:['180px'],
			area: ['1020px', '335px'],
			content: '__MODULE__/Outbound/printorder_picklist/picklist_id/'+{:I('id')} //iframe的url
	});
		<!-- window.parent.showTab(bagInboundInfoUrl,'调拨单详情'); -->
	})
</script>
</html>